package cn.actoncode.boot.module.ai.convert.user;

import cn.actoncode.boot.framework.security.core.LoginUser;
import cn.actoncode.boot.module.ai.controller.app.user.vo.AppUserInfoRespVO;
import cn.actoncode.boot.module.ai.controller.app.user.vo.UserUpdateReqVO;
import cn.actoncode.boot.module.ai.dal.dataobject.user.MemberUserDO;
import cn.actoncode.boot.module.member.api.user.dto.LoginUserDTO;
import cn.actoncode.boot.module.member.api.user.dto.MemberUserRespDTO;
import cn.actoncode.boot.module.member.api.user.dto.UserInfoDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface MemberUserConvert {

    MemberUserConvert INSTANCE = Mappers.getMapper(MemberUserConvert.class);

    MemberUserDO convert(UserUpdateReqVO bean);

    @Mapping(source = "id", target = "userId")
    LoginUserDTO convert(MemberUserDO bean);

    LoginUserDTO convert(LoginUser bean);

    LoginUser convert(LoginUserDTO bean);

    UserUpdateReqVO convert(UserInfoDTO bean);

    UserInfoDTO convert02(MemberUserDO bean);

    MemberUserRespDTO convert03(MemberUserDO bean);

    AppUserInfoRespVO convert05(MemberUserDO bean);

}
